package com.huika.dealontop.control.homepage.utils.fourad;

import android.app.Activity;
import android.view.View;

import com.huika.dealontop.GlobalApp;
import com.huika.dealontop.R;
import com.huika.dealontop.control.homepage.utils.fourad.basefourad.BaseFourAd;
import com.huika.dealontop.support.domain.HomePageAdvertisementSeatInfo;

import java.util.ArrayList;

;
;

/**
 * Created by cailu on 2016/1/13.
 */
public class OneAd extends BaseFourAd {

    private View mView;


    public OneAd(Activity context, ArrayList<HomePageAdvertisementSeatInfo> info) {
        super(context, info);
    }

    @Override
    protected void initWidget() {
        initHomePageFourAdvertisementDatas();
    }

    @Override
    protected void widgetClick(View v) {

    }

    @Override
    protected View initRoot() {
        mView = View.inflate(mContext, R.layout.item_onead, null);
        return mView;
    }


    public View getAdView() {
        return mView;
    }

    private void initHomePageFourAdvertisementDatas() {
        setLayoutParamsHW(mAdvertisementOne, mWidthPixels, (int) (mWidthPixels / 640.0 * 128));
        GlobalApp.loadImg(mAdvertisementOne, mHomePageFourAdvertisementLists.get(0).getAdPic());
    }

}
